import os
basedir = os.path.abspath(os.path.dirname(__file__))

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'hdbox secret key, so long46*#@!)#*(&#^*!!dfs'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = True

    @staticmethod
    def init_app(app):
        pass

class DevConfig(Config):
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DB_URL') or 'mysql+mysqlconnector://tcdev:0806dev@localhost:3306/dev'

class TestConfig(Config):
    TESTING = True
    SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DB_URL') or 'mysql+mysqlconnector://tctest:0806test@localhost:3306/test'

class ProConfig(Config):
    SQLALCHEMY_DATABASE_URI = os.environ.get('PRO_DB_URL') or 'mysql+mysqlconnector://tcpro:0806pro@localhost:3306/pro'

config = {
    'dev' : DevConfig,
    'test' : TestConfig,
    'pro' : ProConfig,

    'default' : DevConfig
}
